<?php
/**
 * Created by PhpStorm.
 * User: mac
 * Date: 19/12/19
 * Time: 21:23
 */

namespace app\admin\controller;


use app\common\bean\ListMap;
use app\common\controller\AdminController;
use app\common\enum\UserAddressDefaultEnum;
use app\common\manage\UserAddressManage;

class UserAddress extends AdminController
{

    /**
     * 用户地址列表
     * @throws \Exception
     */
    public function userAddressList(){
        $listMap = new ListMap();
        $listMap->setData($this->getParams);
        $userAddressMap = UserAddressManage::getInstance()->getPaginatorList($listMap);
        $this->assign("userAddressList",$userAddressMap->getList());
        $this->assign("currentPage",$userAddressMap->getCurrentPage());
        $this->assign("totalCount",$userAddressMap->getTotalCount());
        $this->assign('defaultSelect',UserAddressDefaultEnum::getArrayName());
        return $this->fetch();
    }
}